Vue.component("vote",{
    template:`
<div>
    \t<div id="header" class="wrap">
    \t\t<img src="images/logo.gif" />
    \t</div>
    \t<div id="navbar" class="wrap">
    \t\t<div class="profile">
    \t\t\t<login ref="lg">
    \t\t\t\t<template #nologin>
    \t\t\t\t\t<a href="#" @click="$refs.lg.openRegister = true">注册</a>
    \t\t\t\t\t<a href="#" @click="$refs.lg.openLogin = true">登录</a>
    \t\t\t\t</template>
    \t\t\t\t<template #logined="a">
    \t\t\t\t\t欢迎 {{a.myinfo.uname}}
    \t\t\t\t\t<a href="#" @click="$refs.lg.logout()">退出</a>
    \t\t\t\t</template>
    \t\t\t</login>
    
    \t\t\t<span class="return"><a href="index.html">返回列表</a></span>
    \t\t\t<span class="addnew"><a href="add.html">添加新投票</a></span>
    \t\t</div>
    \t\t<div class="search">
    \t\t\t<form method="post" action="#">
    \t\t\t\t
    <input type="text" v-model="vname" name="keywords" class="input-text" value=""/>
    <input type="submit" @click.prevent="$emit('change',vname)" name="submit" class="input-button" value="" />
    \t\t\t</form>
    \t\t</div>
    \t</div>
      <slot></slot>
    \t<div id="footer" class="wrap">
    \t源辰信息 &copy; 版权所有
    </div>
</div>
    `,
    data(){
        return {
            vname : ""
        }
    }
});